<style lang="less">
  @import './login.less';
</style>

<template>
  <div class="login">
    <div class="login-con">
      <Card icon="log-in" title="欢迎登录" :bordered="false">
        <div class="form-con">
          <login-form @on-success-valid="handleSubmit"></login-form>
        </div>
      </Card>
    </div>
  </div>
</template>

<script>
import LoginForm from '@/components/login-form/login-form.vue'
export default {
  components: {
    LoginForm
  },
  methods: {
    handleSubmit ({ userName, password }) {
			this.$api.post('/auth/user/login', {username: userName, password: password}, { Authorization: 'Basic cmVzb3VyY2Utc2VydmljZToxMjM0NTY=' }, r => {
				console.log(r)
			})
    }
  }
}
</script>

<style>

</style>
